package org.jackysoft.google.collection;

import java.util.Map;

import org.apache.struts2.json.annotations.JSON;
import org.bson.types.ObjectId;
import org.jackysoft.entity.Identifiable;

import com.google.common.collect.Maps;
import com.mongodb.DBObject;


public class ZTreeNode implements Identifiable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1668422184681832316L;
	private String id;
	private String key;
	private boolean checked;
	private String isParent;
	private String name;
	private boolean nocheck;
	private boolean open = false;
	private String target;
	private String href;	
	private boolean visiable;
	private Integer sort;
	private String ztype;
    private Map<String,Object> attrs = Maps.newHashMap();
	
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isNocheck() {
		return nocheck;
	}

	public void setNocheck(boolean nocheck) {
		this.nocheck = nocheck;
	}

	public boolean isOpen() {
		return open;
	}

	public void setOpen(boolean open) {
		this.open = open;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public String getIsParent() {
		return isParent;
	}

	public void setIsParent(String isParent) {
		this.isParent = isParent;
	}

	public String getHref() {
		return href;
	}

	public void setHref(String href) {
		this.href = href;
	}

	public boolean isVisiable() {
		return visiable;
	}

	public void setVisiable(boolean visiable) {
		this.visiable = visiable;
	}

	@Override
	public void setObjectId(ObjectId objectId) {
		// TODO Auto-generated method stub
		
	}

	@Override@JSON(serialize=false)
	public ObjectId getObjectId() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setLeaf(boolean leaf) {
		// TODO Auto-generated method stub
		
	}

	@Override@JSON(serialize=false)
	public Boolean isLeaf() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void setRoot(DBObject root) {
		// TODO Auto-generated method stub
		
	}

	@Override@JSON(serialize=false)
	public DBObject getRoot() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setSort(Integer sort) {
		this.sort = sort;
		
	}

	@Override
	public Integer getSort() {
	
		return this.sort;
	}

	public Map<String,Object> getAttrs() {
		return attrs;
	}

	
	public ZTreeNode attr(String key ,Object value){
		this.attrs.put(key, value);
		return this;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getZtype() {
		return ztype;
	}

	public void setZtype(String ztype) {
		this.ztype = ztype;
	}
	

}
